{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "c5aa2204-b040-4490-8d4b-66d932de206a",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import sys\n",
    "sys.path.append('../../../src')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "da92c6e8-e2eb-4ae3-aebf-5963a6cd049e",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sryolo.devtools import dataset_utils"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "3f0e5246-b95c-4fb2-af89-559d2e1ebbc1",
   "metadata": {},
   "outputs": [],
   "source": [
    "del_list = dataset_utils.clear_raw_images_without_label('base-detect')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "1e3c4068-8ba3-4cad-8b14-de11c1221b67",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "47"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(del_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "77768c45-8ce5-4341-bd88-cde1a0ab6dea",
   "metadata": {},
   "outputs": [],
   "source": [
    "for del_item in del_list:\n",
    "    if del_item.find('-mnyz-') == -1:\n",
    "        print(del_item)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "36ca5441-ad8f-4c87-b3a7-87e92c8e3a39",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0060-模拟宇宙下层入口-mnyz-xcrk-00001.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0060-模拟宇宙下层入口-mnyz-xcrk-00002.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0060-模拟宇宙下层入口-mnyz-xcrk-00003.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0060-模拟宇宙下层入口-mnyz-xcrk-00004.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0060-模拟宇宙下层入口-mnyz-xcrk-00005.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0060-模拟宇宙下层入口-mnyz-xcrk-00006.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0060-模拟宇宙下层入口-mnyz-xcrk-00007.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0060-模拟宇宙下层入口-mnyz-xcrk-00008.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0060-模拟宇宙下层入口-mnyz-xcrk-00009.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00001.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00002.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00003.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00004.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00005.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00006.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00007.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00008.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00009.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00010.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00011.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00012.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00013.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00014.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00015.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00016.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00017.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00018.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00019.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00020.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00021.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00022.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0061-模拟宇宙事件-mnyz-xcrk-00023.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00001.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00002.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00003.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00004.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00005.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00006.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00007.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00008.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00009.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00010.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00011.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00012.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00013.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00014.png',\n",
       " 'F:\\\\code\\\\workspace\\\\StarRail-YOLO\\\\ultralytics\\\\datasets\\\\base-detect\\\\images\\\\0063-模拟宇宙黑塔-mnyz-ht-00015.png']"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dataset_utils.clear_raw_images_without_label('base-detect', True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7f0d5cc6-c4c4-48fd-82e1-330099fa5973",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
